<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
    <title>用户基本信息</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            background-color: #f4f4f4;
            color: #333;
            margin: 0;
            padding: 0;
        }
        .container {
            max-width: 800px;
            margin: 0 auto;
            padding: 20px;
            background-color: #fff;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        }
        h2 {
            text-align: center;
            margin-bottom: 20px;
        }
        form {
            margin-top: 20px;
            padding: 10px;
            border: 1px solid #ccc;
            border-radius: 5px;
        }
        form input[type="text"] {
            width: 100%;
            padding: 8px;
            margin-bottom: 10px;
            box-sizing: border-box;
        }
        form button {
            background-color: #007bff;
            color: #fff;
            border: none;
            padding: 10px 20px;
            cursor: pointer;
            border-radius: 5px;
        }
        p {
            margin-bottom: 8px;
        }
    </style>
</head>
<body>
<div>
    <%@ include file="Function.jsp" %>
</div>

<div class="container">
    <h2>用户基本信息</h2>


    <c:forEach items="${searchResults}" var="user" varStatus="row">
        <div>
            <p><strong>序号 ID:</strong> ${user.id}</p>
            <p><strong>用户名:</strong> ${user.username}</p>
            <p><strong>性别:</strong> ${user.gender}</p>
            <p><strong>职业:</strong> ${user.profession}</p>
            <p><strong>爱好:</strong> ${user.favor}</p>
            <p><strong>个人信息:</strong> ${user.description}</p>
            <p><strong>权限:</strong> ${user.role}</p>
            <p><strong>状态:</strong> ${user.state}</p>
        </div>
    </c:forEach>
    <label>
        选择你所需要修改的信息
    </label>
    <!-- 修改用户信息表单 -->
    <form action="UpdateUserInfoServlet.do" method="post">
        <input type="hidden" name="userId" value="${user.id}"><br>
<%--        <input type="text" name="Username" value="${user.username}" placeholder="用户名">--%>
        <input type="text" name="Gender" value="${user.gender}" placeholder="性别">
        <input type="text" name="Profession" value="${user.profession}" placeholder="职业">
        <input type="text" name="Favor" value="${user.favor}" placeholder="爱好">
        <input type="text" name="Description" value="${user.description}" placeholder="个人信息">
        <input type="text" name="state" placeholder="状态 1 2">
        <input type="text" name="role" placeholder="权限 1 2">
       <div  style="text-align: center"><button type="submit">确认更新</button></div>
    </form>
<div style="text-align: center ;padding: 20px 20px 100px 20px ">
    <!-- 重置密码表单 -->
    <form action="ResetPasswordServlet.do" method="post">
        <label>
            <h>密码忘记选择重置密码</h><br>
        </label>
        <input type="hidden" name="userId" value="${user.id}"><br>
        <button type="submit">重置密码</button>
    </form>
</div>
</div>

</body>
</html>
